#include <mfile.h>
#include <easy_sock.h>
#include <demo.h>
#include <mlog.h>

int main()
{
    RQ rq;
    int sfd;
    char sbuf[200];
    
    memset( &rq, 0x00, sizeof(RQ) );
    memset( &sbuf, 0x00, sizeof(sbuf) );
    strcpy( rq.rq_name, "rq_test");
    rq.rq_type = 1;
    rq.msg_len = 123;
    memcpy( sbuf, &rq, sizeof(RQ) );

    sfd=connect_to( "127.0.0.1", 1234 );
    if( sfd = -1)
    {
        mlog("demo_cli.log", _FL_, "connect failed!" );
        return 1;
    }
    send( sfd, sbuf, sizeof(RQ), 0 );
    close(sfd);
}
